<?php
namespace App\Models\Garage;

use App\Models\Operation\WarehouseEntry;

class Garage extends BaseModel
{
    protected $table = 'beesoft_garages';
    protected $fillable = [
        'name',
        'email',
        'password',
    ];

    // 关联
    public function warehouseEntry() {
        return $this->hasMany(WarehouseEntry::class);
    }

    public static function getGarages() {
        return self::pluck('title', 'id')->toArray();
    }
}
